#include <bits/stdc++.h>
using namespace std;
int arr[10],sum = 0;


int main() {
    for (int i = 0; i < 10; ++i) {
        cin>>arr[i];
        if (i%2==0) arr[i] *= 2;
        else arr[i] += 2;
        sum += arr[i];
    }
    cout<<"sum = "<<sum;
}
